package com.wyd.principle.DependencyInversion;

public class DependencyInversionDemo01 {
}
class Email{
    public String getMsg(){
        return "Email 信息";
    }
}

/**
 * 假设场景，添加接受微信、短信等消息
 *
 * Email 为具体实现类，此处应该依赖抽象
 */
class User{
    public void receive(Email email){
        System.out.println(email.getMsg());
    }
}
